# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: PyroDevil <p dot devil at gmail dot com>

pkgname=python-queuelib
pkgver=1.6.2
pkgrel=3
pkgdesc="Collection of persistent (disk-based) queues."
arch=('any')
license=('BSD')
url="https://scrapy.org"
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::https://github.com/scrapy/queuelib/archive/v$pkgver.tar.gz")
sha512sums=('f474fd5cc24b72e4d6b0ddcb64ef775c06a213abb7a5b11b101671e27db46655f8debd9a3f438a1eaad0c0bb0d223d3151bde9132bdf3b6e9b19bff28b43a091')

build() {
  cd queuelib-$pkgver
  python setup.py build
}

check() {
  cd queuelib-$pkgver
  py.test
}

package() {
  cd queuelib-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
  install -D -m644 README.rst -t "$pkgdir"/usr/share/doc/$pkgname
}
